@extends('admin.main')
@section('content')
    <div class="admin-content">
        <div class="am-cf am-padding am-padding-bottom-0">
            <div class="am-fl am-cf">
                <strong class="am-text-primary am-text-lg">后台设置</strong>
                /
                <small>货单其他信息</small>
            </div>
        </div>
        <hr>
        <div class="am-g">
            @include('admin.layouts.adminInfo')
            <div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
                <dd style="padding:5px 10px;padding-top:10px;
                    border:1px solid #f0f0f0;box-shadow:0 0 10px #e0e0e0;
                    background:#fefefe;
                    position:fixed;top:150px;right:50px;">
                    <dl>
                        <a href="#size">尺寸颜色</a>
                    </dl>
                    <dl>
                        <a href="#img">图片细节</a>
                    </dl>
                    <dl>
                        <a href="#stuff">成分缩率</a>
                    </dl>
                    <dl>
                        <a href="#deplete">单耗</a>
                    </dl>
                    <dl>
                        <a href="#orderType">产品种类</a>
                    </dl>
                    <dl>
                        <a href="#style">产品风格</a>
                    </dl>
                    <dl>
                        <a href="#design">产品款式</a>
                    </dl>
                </dd>
                <table class="am-table am-table-striped
                    am-table-hover table-main">
                    <tbody id="tbody-alert">
                    {{--尺寸颜色--}}
                    <tr>
                        <td id="size">
                            <h2>
                                尺寸颜色：
                                <br>
                                <a href="javascript:;"
                                   onclick="modifySize();">编辑</a>
                            </h2>
                        </td>
                    </tr>
                    <tr>
                        <td width="600">
                            <div style="width:100%;max-height:400px;
                                overflow:auto;">
                                <table class="am-table am-table-striped
                                    am-table-hover table-main"
                                       style="background:#dddddd;"
                                >
                                    <tr>
                                        <td></td>
                                        <td><b>S</b></td>
                                        <td><b>M</b></td>
                                        <td><b>L</b></td>
                                        <td><b>XL</b></td>
                                        <td><b>XXL</b></td>
                                        <td><b>XXXL</b></td>
                                    </tr>
                                @if(count($sizes))
                                @foreach($sizes as $k => $size)
                                    <tr>
                                        <td><b>{{$colors[$k]}}</b></td>
                                        <td>{{$size[1]?'√':'x'}}</td>
                                        <td>{{$size[2]?'√':'x'}}</td>
                                        <td>{{$size[3]?'√':'x'}}</td>
                                        <td>{{$size[4]?'√':'x'}}</td>
                                        <td>{{$size[5]?'√':'x'}}</td>
                                        <td>{{$size[6]?'√':'x'}}</td>
                                    </tr>
                                @endforeach
                                @endif
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td><hr></td>
                    </tr>
                    {{--图片细节--}}
                    <tr>
                        <td id="com">
                            <h2>图片细节：</h2>
                        </td>
                    </tr>
                    <tr>
                        <td width="600">
                            <b>主图：</b>
                            <a href="javascript:;"
                               onclick="modifyImg(1);">编辑</a>
                            @if($imgs[0] && file_exists(ltrim($imgs[0],'/')))
                                <br>
                                <img src="{{$imgs[0]}}" height="100">
                            @endif
                            <br><br>
                            <b>款式图：</b>
                            <a href="javascript:;"
                               onclick="modifyImg(2);">编辑</a>
                            @if($imgs[1] && file_exists(ltrim($imgs[1],'/')))
                                <br>
                                <img src="{{$imgs[1]}}" height="100">
                            @endif
                            <br><br>
                            <b>粘衬部位：</b>
                            <a href="javascript:;"
                               onclick="modifyImg(3);">编辑</a>
                            @if($imgs[2] && file_exists(ltrim($imgs[2],'/')))
                                <br>
                                <img src="{{$imgs[2]}}" height="100">
                            @endif
                            <br><br>
                            <b>背面图：</b>
                            <a href="javascript:;"
                               onclick="modifyImg(4);">编辑</a>
                            @if($imgs[3] && file_exists(ltrim($imgs[3],'/')))
                                <br>
                                <img src="{{$imgs[3]}}" height="100">
                            @endif
                            <br><br>
                            <b>关键部位细节：</b>
                            <a href="javascript:;"
                               onclick="modifyImg(5);">编辑</a>
                            @if($imgs[4] && file_exists(ltrim($imgs[4],'/')))
                                <br>
                                <img src="{{$imgs[4]}}" height="100">
                            @endif
                            <br><br>
                            <b>关键部位细节图：</b>
                            <a href="javascript:;"
                               onclick="modifyImg(6);">编辑</a>
                            @if($imgs[5] && file_exists(ltrim($imgs[5],'/')))
                                <br>
                                <img src="{{$imgs[5]}}" height="100">
                            @endif
                            <br><br>
                        </td>
                    </tr>
                    <tr>
                        <td><hr></td>
                    </tr>
                    {{--成分缩率--}}
                    <tr>
                        <td id="stuff">
                            <h2>
                                成分缩率：
                                <a href="javascript:;"
                                   onclick="modifyStuff()">编辑</a>
                            </h2>
                        </td>
                    </tr>
                    <tr>
                        <td width="600">
                            <div style="max-height:400px;overflow:auto;">
                                <table class="am-table am-table-striped
                                    am-table-hover table-main"
                                       style="background:#EEEEEE;"
                                    >
                                    <tr>
                                        <td><b>面辅料</b></td>
                                        <td><b>成分/缩率</b></td>
                                    </tr>
                                    @if($stuffs)
                                    @foreach($stuffs as $key => $stuff)
                                        <tr style="margin:10px;">
                                        <td>{{$stuff['key']}}</td>
                                        <td>{{$stuff['val']}}</td>
                                        </tr>
                                    @endforeach
                                    @endif
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td><hr></td>
                    </tr>
                    {{--单耗--}}
                    <tr>
                        <td id="deplete">
                            <h2>
                                单耗：
                                <a href="javascript:;"
                                   onclick="modifyDeplete()">编辑</a>
                            </h2>
                        </td>
                    </tr>
                    <tr>
                        <td width="600">
                            <div style="max-height:400px;overflow:auto;">
                                <table class="am-table am-table-striped
                                    am-table-hover table-main"
                                       style="background:#dddddd;">
                                    <tr>
                                        <td><b>名称</b></td>
                                        <td><b>规格</b></td>
                                        <td><b>用量</b></td>
                                        <td><b>备注</b></td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td><hr></td>
                    </tr>
                    {{--产品种类--}}
                    <tr>
                        <td id="orderType">
                            <h2>
                                产品种类：
                                <a href="javascript:;"
                                   onclick="modifyOrderType()">编辑</a>
                            </h2>
                        </td>
                    </tr>
                    <tr>
                        <td width="600">
                            <div style="max-height:400px;overflow:auto;">
                                <table class="am-table am-table-striped
                                    am-table-hover table-main"
                                       style="background:#dddddd;">
                                    <tr>
                                        <td><b>产品名称</b></td>
                                        <td><b>男装</b></td>
                                        <td><b>女装</b></td>
                                        <td><b>童装</b></td>
                                    </tr>
                                    @if($orderTypes)
                                        @foreach($orderTypes as $orderType)
                                    <tr style="margin:10px;">
                                        <td>{{$orderType['name']}}</td>
                                        <td>{{$orderType['male']?'√':'x'}}</td>
                                        <td>{{$orderType['female']?'√':'x'}}</td>
                                        <td>{{$orderType['child']?'√':'x'}}</td>
                                    </tr>
                                        @endforeach
                                    @endif
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td><hr></td>
                    </tr>
                    {{--产品风格--}}
                    <tr>
                        <td id="style">
                            <h2>产品风格：</h2>
                            此处点击
                            <a href="javascript:;"
                               onclick="addStyle()">新增</a>
                            ，以下风格点击编辑
                        </td>
                    </tr>
                    <tr>
                        <td width="600">
                            @if(count($styles))
                            @foreach($styles as $key => $style)
                                <label onclick="modifyStyle({{$key}})">
                                    {{$style}}
                                </label> &nbsp; &nbsp;
                                <input type="hidden" id="styleName{{$key}}"
                                       value="{{$style}}">
                            @endforeach
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td><hr></td>
                    </tr>
                    {{--产品款式--}}
                    <tr>
                        <td id="design">
                            <h2>产品款式：</h2>
                            此处点击
                            <a href="javascript:;"
                               onclick="addDesign()">新增</a>
                            ，以下风格点击编辑
                        </td>
                    </tr>
                    <tr>
                        <td width="600">
                            @if(count($designs))
                            @foreach($designs as $key => $design)
                                <label onclick="modifyDesign({{$key}})">
                                    {{$design}}
                                </label> &nbsp; &nbsp;
                                <input type="hidden" id="designName{{$key}}"
                                       value="{{$design}}">
                            @endforeach
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td><hr></td>
                    </tr>
                    </tbody>
                </table>
                <button type="button" class="am-btn am-btn-primary"
                        onclick="history.go(-1);">返回</button>
                <br><br><br><br><br><br><br><br><br>
            </div>
        </div>
    </div>
    <input type="hidden" id="id" value="{{$data->id}}">
    <input type="hidden" id="_token" value="{{csrf_token()}}">

    @include('admin.order.bale.otherPop')
    @include('admin.order.bale.otherJs')
@stop